#pragma once

#include "SkinControl.h"
// CSkinButton

class CSkinButton : public CButton, public CSkinControl
{
	DECLARE_DYNAMIC(CSkinButton)

public:
	CSkinButton();
	virtual ~CSkinButton();

	BOOL SetTooltip(LPCTSTR lpszText);
protected:
	virtual BOOL CreateInternal(const RECT& rect, CWnd* pParentWnd, UINT nID);
	virtual BOOL LoadSkinImage(LPCTSTR lpszFilename);
	virtual void DrawIt (Gdiplus::Bitmap* pbmWnd, const RECT& rect);
private:
	Gdiplus::Bitmap*	m_pBitmaps[4];
	Gdiplus::Bitmap*&	m_pImgNormal, *&m_pImgOver, *&m_pImgDown, *&m_pImgDisabled;
	Gdiplus::Bitmap *	m_pCurImg;
	BOOL m_CheckedButton, m_MouseOnButton;
	CToolTipCtrl		m_ctrlTooltip;
protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnCaptureChanged(CWnd *pWnd);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnBnClicked();
};


